<!DOCTYPE html>
<html lang="zh" xmlns:th="http://www.thymeleaf.org">
<head>
    <th:block th:include="include :: header('修改会员信息')"/>
</head>
<body class="white-bg">
<div class="wrapper wrapper-content animated fadeInRight ibox-content">
    <form class="form-horizontal m" id="form-member-edit" th:object="${member}">
        <input name="id" type="hidden" th:field="*{id}"/>
        <div class="form-group">
            <label class="col-sm-3 control-label">会员名：</label>
            <div class="col-sm-4">
                <input class="form-control" type="text" th:field="*{userName}">
            </div>
        </div>
        <div class="form-group">
            <label class="col-sm-3 control-label">性别：</label>
            <div class="col-sm-2">
                <select name="sex" class="form-control m-b" th:with="type=${@dict.getType('sys_user_sex')}">
                    <option th:each="dict : ${type}" th:text="${dict.dictLabel}" th:value="${dict.dictValue}" th:field="*{sex}"></option>
                </select>
            </div>
        </div>
        <div class="form-group">
            <label class="col-sm-3 control-label">手机：</label>
            <div class="col-sm-4">
                <input class="form-control" type="text" th:field="*{phone}">
            </div>
        </div>
        <div class="form-group">
            <label class="col-sm-3 control-label">邮箱：</label>
            <div class="col-sm-4">
                <input class="form-control" type="text" th:field="*{email}">
            </div>
        </div>
    </form>
</div>
<th:block th:include="include :: footer"/>

<script type="text/javascript">
    var prefix = ctx + "back/member";

    function submitHandler() {
        if ($.validate.form()) {
            $.operate.save(prefix + "/edit", $('#form-member-edit').serialize());
        }
    }
</script>
</body>
</html>
